package com.sm.controller;

import com.sm.model.VipCardKey;
import com.sm.service.VipCardKeyService;
import com.sm.util.Msg;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/vipCard")
public class VipCardKeyController {

    @Autowired
    private VipCardKeyService vipCardKeyService;

    /**
     * 用户输入实体VIP卡密钥提升角色
     */
    @RequestMapping("/useVipCard")
    @ResponseBody
    public Msg useVipCard(@RequestParam("key")String keyStr,@RequestParam("userId")Integer userId){
        VipCardKey vipCardKey = vipCardKeyService.selectCardByKeyStr(keyStr);

//  测试测试
return Msg.success();
  }






}
